﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using Biblio.Domain;

namespace Biblio.DataAccess
{
    public class BiblioDbContext : DbContext
    {
        public BiblioDbContext()
            : base("Name=BiblioDb")
        {

        }

        static BiblioDbContext()
        {
            Database.SetInitializer(new DropCreateDatabaseIfModelChanges<BiblioDbContext>());
        }


        public DbSet<Cuenta> Cuentas { get; set; }
        public DbSet<Administrador> Administradores { get; set; }
        public DbSet<Socio> Socios { get; set; }
        public DbSet<Material> Materiales { get; set; }
        public DbSet<Autor> Autores { get; set; }
        public DbSet<Ejemplar> Ejemplares { get; set; }
        public DbSet<Reserva> Reservas { get; set; }
        public DbSet<Prestamo> Prestamos { get; set; }

    }
}
